package io.renren.dao;

import io.renren.common.dao.BaseDao;
import io.renren.dto.TemporaryOrderDTO;
import io.renren.entity.TemporaryOrderEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 临时采购表
 *
 * @author 翟文闯 619556390@QQ.com
 * @since 1.0.0 2019-12-31
 */
@Mapper
public interface TemporaryOrderDao extends BaseDao<TemporaryOrderEntity> {
    @Select("select * from canteens_temporary_order where ched_id = '${chedId}' and canteen_id = '${canteenId}' and sign = '${sign}' GROUP BY sign")
   TemporaryOrderDTO getTemOrder(int sign,Long chedId, Long canteenId );

    @Select("DELETE from  canteens_temporary_order where sign = '${sign}' and canteen_id = '${canteenId}'")
    void deleteOrder(int sign,long canteenId);

}